package sk.naive.talker.command;

import sk.naive.talker.User;

import java.rmi.RemoteException;

/**
 *
 * @author <a href="mailto:rytier@naive.deepblue.sk">Martin "Rytier" Kerni</a>
 * @version $Revision: 1.6 $ $Date: 2004/10/19 22:49:27 $
 */
public class LastTell extends Tell {
	public static final String UPROP_LTELL_RCPT = "lastTellRecipient";

	protected boolean paramsCheck(String recipientLogin, String message) {
		return (message != null);
	}

	protected String targetUserNotFoundWarning() {
		return "message.noTellWarning";
	}

	protected String getRecipientLogin(User user, String s) throws RemoteException {
		return (String) user.getProperties().get(UPROP_LTELL_RCPT);
	}

	protected String getMessage(String s) {
		return s;
	}
}